package com.wzh.musichome.controller;


import com.wzh.musichome.entity.dto.AdminLoginDTO;
import com.wzh.musichome.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpSession;

/**
 * <p>
 * 管理员 前端控制器
 * </p>
 *
 * @author wzh
 * @since 2020-12-10
 */
@RestController
@RequestMapping("/admin")
public class AdminController {

    @Autowired
    private AdminService adminService;

    @PostMapping("/login/status")
    public Object login(@RequestBody AdminLoginDTO adminLoginDTO, HttpSession session){
        return adminService.login(adminLoginDTO,session);
    }



    @PostMapping("/test")
    public Object login(){
        return "ok";
    }
}
